﻿@model WebSite.Models.TrainingPageVM
<div id="sidebar">
    <h4><a href="@Url.Action("Index", "Training")">@Model.FilterLabel</a></h4>
    <ul>
        @foreach (WebSite.Models.TrainingPageVM.CourseCategoryVM category in @Model.Categories)
        {
            <li>
                <a class="@(category.Selected ? "active" : "") @(!String.IsNullOrEmpty(category.CustomCSS) ? category.CustomCSS : "")" href="@Url.Action("Category", "Training", new { name = category.ParamName })">@category.Name</a>
                @if (category.ChildCategories != null && category.ChildCategories.Count() > 0)
                {
                    <ul class="nested">
                    @foreach (WebSite.Models.TrainingPageVM.CourseCategoryVM c in category.ChildCategories)
                    {
                         <li>
                            <a class="@(c.Selected ? "active " : " ") @(!String.IsNullOrEmpty(c.CustomCSS) ? c.CustomCSS : "")" href="@Url.Action("Course", "Training", new { name = c.ParamName })">@c.Name</a>
                         </li>
                    }
                    </ul>
                }
            </li>
        }
    </ul>
</div>

